﻿using System.Collections;
using System.Collections.Generic;
using winS.winML;

namespace winS.Unity.Process
{
    /// <summary>
    /// 对 <see cref="IGeneralStep"/> 的抽象实现
    /// </summary>
    public abstract class GeneralStep : Step, IGeneralStep
    {
        [WinMLSerializable]
        public IList<string> nextStepsList { get; set; } = new List<string>();

        public override IEnumerable<string> GetSubsequentSteps(ProcessContext processContext)
        {
            return nextStepsList;
        }

        public IEnumerator<string> GetEnumerator()
        {
            return nextStepsList.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return nextStepsList.GetEnumerator();
        }
    }
}